package com.g8.pethospitallearnbackend.entity;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;

@Data
@AllArgsConstructor
public class Casefields implements Serializable {
    private String enAttr;

    private String chAttr;

    private static final long serialVersionUID = 1L;

    public String getEnAttr() {
        return enAttr;
    }

    public void setEnAttr(String enAttr) {
        this.enAttr = enAttr;
    }

    public String getChAttr() {
        return chAttr;
    }

    public void setChAttr(String chAttr) {
        this.chAttr = chAttr;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", enAttr=").append(enAttr);
        sb.append(", chAttr=").append(chAttr);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Casefields other = (Casefields) that;
        return (this.getEnAttr() == null ? other.getEnAttr() == null : this.getEnAttr().equals(other.getEnAttr()))
            && (this.getChAttr() == null ? other.getChAttr() == null : this.getChAttr().equals(other.getChAttr()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getEnAttr() == null) ? 0 : getEnAttr().hashCode());
        result = prime * result + ((getChAttr() == null) ? 0 : getChAttr().hashCode());
        return result;
    }
}